infoGo to Tips Page
messageTech Support
  • Prepare for InterviewPrepare for Interview
  • AcknowledgementsAcknowledgements
  • Test hardwareTest hardware
  • What to ExpectWhat to Expect
  • Start InterviewStart Interview
  • Video QuestionVideo Question
  • Video QuestionVideo Question
  • Video QuestionVideo Question
  • Algorithm QuestionAlgorithm Question
  • SQL QuestionSQL Question
  • Data Science QuestionData Science Question
  • AvailabilityAvailability
  • Preview & SubmitPreview & Submit
  • Finish InterviewFinish Interview
Powered by

Question 4/6

"Arrange in Alphabetic Order"

Your solution will be scored against some number of hidden test cases. A sample is provided below.


Given a list of Strings, write a program to sort the list alphabetically.
If there are upper case and lower case letters, sort them together by ignoring case while sorting. If the same word is repeated with different case, print lower case first, followed by the one with upper case.
While sorting ensure numbers are printed prior to alphabets. Ignore punctuations and special characters while sorting.

Input

First line contains an integer N, denoting the number of strings in the list.
The next N lines contain the words in the list.

Output

Print the list of words after sorting in increasing alphabetical order.(see sample input/output)
Please make sure your output format matches the samples.
Code evaluation is based on output, please do NOT print anything else.

3.8.1
Console
90
The screen capture will appear in this box.